export class ImageLoader {
  inited = false
  async init() {
    if (this.inited) {
      return
    }

    this.inited = true
  }

  dynamicImport(path) {
    // see https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations
    return import(`../../assets/svg/${path}.svg`)
  }

}

const imageLoader = new ImageLoader()

export default imageLoader
